package com.ganzalang.gmall.interfacespecification.sixth.enums;

import lombok.Data;
import lombok.Getter;

/**
 * @description:
 * @author: Ganzalang
 * @Date 2021/3/31 9:22
 */
@Getter
public enum ResultCode {

    /**
     * 操作成功
     */
    SUCCESS(1000, "操作成功"),
    /**
     * 响应失败
     */
    FAILED(1001, "响应失败"),
    /**
     * 校验参数异常
     */
    VALIDATE_FAIL(1002, "校验参数异常"),
    /**
     * 未知错误
     */
    ERROR(5000, "未知错误");

    private Integer code;

    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
